home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / SRC / HOARDDLL.ZIP / 3rdParty / hoard / libhoard-2.0.2 / configure.in < prev    next >
Encoding:
Text File  |  2002-03-06  |  4.9 KB  |  183 lines

  1. dnl
  2. dnl Hoard: A Fast, Scalable, and Memory-Efficient Allocator
  3. dnl        for Shared-Memory Multiprocessors
  4. dnl Contact author: Emery Berger, http://www.cs.utexas.edu/users/emery
  5. dnl
  6. dnl Copyright (c) 1998, 1999, The University of Texas at Austin.
  7. dnl
  8. dnl This library is free software; you can redistribute it and/or modify
  9. dnl it under the terms of the GNU Library General Public License as
  10. dnl published by the Free Software Foundation, http://www.fsf.org.
  11. dnl
  12. dnl This library is distributed in the hope that it will be useful, but
  13. dnl WITHOUT ANY WARRANTY; without even the implied warranty of
  14. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. dnl Library General Public License for more details.
  16. dnl
  17.  
  18. dnl Process this file with autoconf to produce a configure script.
  19. dnl
  20.  
  21. AC_INIT(superblock.h)
  22. AC_CONFIG_AUX_DIR(autoconf)
  23. AC_PREREQ(2.13)dnl Minimum Autoconf version required.
  24.  
  25. AM_INIT_AUTOMAKE(libhoard, 2.0)
  26.  
  27. dnl Enable Features
  28. AC_ARG_ENABLE(debug,
  29. [  --enable-debug          Enable debugging. [default=no]],
  30. debug=$enableval,
  31. debug=no)
  32. AM_CONDITIONAL(DEBUG, test X"$debug" = Xyes)
  33.  
  34. AC_ARG_ENABLE(privateheaps,
  35. [  --enable-privateheaps   Enable private heaps. [default=no]],
  36. privateheaps=$enableval,
  37. privateheaps=no)
  38. AM_CONDITIONAL(PRIVATEHEAPS, test X"$privateheaps" = Xyes)
  39.  
  40. AC_ARG_ENABLE(windowsnt,
  41. [  --enable-windowsnt      Compile for Windows NT. [default=no]],
  42. windowsnt=$enableval,
  43. windowsnt=no)
  44. AM_CONDITIONAL(WINDOWSNT, test X"$windowsnt" = Xyes)
  45.  
  46. AC_ARG_ENABLE(sproc,
  47. [  --enable-sproc          Compile for SGI's sproc library. [default=no]],
  48. sproc=$enableval,
  49. sproc=no)
  50. AM_CONDITIONAL(SPROC, test X"$sproc" = Xyes)
  51.  
  52. dnl Set C/C++ compiler debugging flags (should come before AC_PROG_CC)
  53. if test "$debug" != "no"; then
  54.     CFLAGS="$CFLAGS -g -DDEBUG"
  55.     CXXFLAGS="$CXXFLAGS -g"
  56. else
  57.     CFLAGS="$CFLAGS -DNDEBUG"
  58.     CXXFLAGS="$CXXFLAGS -DNDEBUG"
  59. fi
  60.  
  61. dnl Checks for programs
  62. AM_PROG_LIBTOOL
  63. AC_PROG_CC
  64. AC_PROG_CXX
  65. AC_PROG_CPP
  66. AC_PROG_INSTALL
  67.  
  68. dnl Checks for libraries
  69. if test X"$sproc" = Xno; then
  70. AC_CHECK_LIB(pthread, pthread_exit, LIBTHREAD1=-lpthread, LIBTHREAD1=)
  71. AC_CHECK_LIB(thread, lwp_self, LIBTHREAD=-lthread, LIBTHREAD=$LIBTHREAD1)
  72. AC_CHECK_LIB(posix4, sched_yield, LIBSCHED=-lposix4, LIBSCHED=)
  73. fi
  74.  
  75. dnl Set C/C++ compiler specific warning/optimization flags
  76. if test X"$GCC" = X"yes"; then    
  77.     EXTRA_CXXFLAGS="-fno-exceptions"
  78.     if test X"$debug" = X"no"; then 
  79.        OPTFLAGS="-Wall -O6 -fexpensive-optimizations -finline-functions -fomit-frame-pointer -ffast-math"
  80.     else
  81.        OPTFLAGS="-Wall -g -fno-inline"
  82.     fi
  83. elif $CXX -V 2>&1 | grep "WorkShop"; then
  84.     SUNWORKSHOP="yes"
  85.     EXTRA_CXXFLAGS="-mt -noex"
  86.     if test X"$debug" = X"no"; then
  87. dnl -fast optimizes for current platofrm, e.g. builds 64bit what is
  88. dnl compatible with 32 bit code ... other targets are ultra, or ultra3
  89.         OPTFLAGS="-fast -xtarget=generic -O2 -dalign"
  90.     else
  91.         OPTFLAGS="-g"
  92.     fi
  93. else
  94.     if test X"$debug" = X"no"; then
  95.         OPTFLAGS="-O"
  96.     else
  97.         OPTFLAGS="-g"
  98.     fi
  99. fi
  100.  
  101. AM_CONDITIONAL(USE_WORKSHOP, test X"$SUNWORKSHOP" = Xyes)
  102. CFLAGS="$CFLAGS -D_REENTRANT=1 $EXTRA_CFLAGS $OPTFLAGS"
  103. CXXFLAGS="$CXXFLAGS -D_REENTRANT=1 $EXTRA_CXXFLAGS $OPTFLAGS"
  104.  
  105. if test X"$privateheaps" = Xyes; then
  106.     AC_DEFINE(USE_PRIVATE_HEAPS, 1)
  107. else
  108.     AC_DEFINE(USE_PRIVATE_HEAPS, 0)
  109. fi
  110.  
  111. if test X"$windowsnt" = Xyes; then
  112.     AC_DEFINE(WIN32, 1)
  113. fi
  114.  
  115. if test X"$sproc" = Xyes; then
  116.     AC_DEFINE(USE_SPROC, 1)
  117. else
  118.     AC_DEFINE(USE_SPROC, 0)
  119. fi
  120.  
  121. dnl Check to see if we're using Linux.
  122. AC_MSG_CHECKING(for Linux)
  123. AC_EGREP_CPP(yes,
  124. [#if defined(__linux)
  125.   yes
  126. #endif
  127. ], is_linux=yes, is_linux=no)
  128. AM_CONDITIONAL(USE_LINUX, test X"$is_linux" = Xyes)
  129. AC_MSG_RESULT($is_linux)
  130.  
  131.  
  132. dnl Check to see if we're using Solaris.
  133. AC_MSG_CHECKING(for Solaris)
  134. AC_EGREP_CPP(yes,
  135. [#if defined(__SVR4)
  136.   yes
  137. #endif
  138. ], is_solaris=yes, is_solaris=no)
  139. AM_CONDITIONAL(USE_SOLARIS, test X"$is_solaris" = Xyes)
  140. AC_MSG_RESULT($is_solaris)
  141.  
  142.  
  143. dnl Architecture-specific tests.
  144. AC_MSG_CHECKING(for Intel x86)
  145. AC_EGREP_CPP(yes,
  146. [#if defined(i386)
  147.   yes
  148. #endif
  149. ], is_x86=yes, is_x86=no)
  150. AM_CONDITIONAL(USE_X86, test X"$is_x86" = Xyes)
  151. AC_MSG_RESULT($is_x86)
  152.  
  153. if test X"$is_x86" = "Xno"; then
  154. AC_MSG_CHECKING(for SPARC)
  155. AC_EGREP_CPP(yes,
  156. [#if defined(sparc)
  157.   yes
  158. #endif
  159. ], is_sparc=yes, is_sparc=no)
  160. AM_CONDITIONAL(USE_SPARC, test X"$is_sparc" = Xyes)
  161. AC_MSG_RESULT($is_sparc)
  162.  
  163. if test X"$is_sparc" = "Xno"; then
  164. AC_MSG_CHECKING(for Power PC)
  165. AC_EGREP_CPP(yes,
  166. [#if defined(ppc)
  167.   yes
  168. #endif
  169. ], is_ppc=yes, is_ppc=no)
  170. AM_CONDITIONAL(USE_PPC, test X"$is_ppc" = Xyes)
  171. AC_MSG_RESULT($is_ppc)
  172. fi
  173. fi
  174.  
  175.  
  176. dnl Outputs
  177. AC_SUBST(LIBTHREAD)
  178. AC_SUBST(LIBSCHED)
  179. AC_OUTPUT(Makefile benchmarks/consume/Makefile benchmarks/larson/Makefile benchmarks/linux-scalability/Makefile benchmarks/shbench/Makefile)
  180.  
  181. echo "Configuration done. Run make to build Hoard."
  182.  
  183.